<?php
/**
 * PatientSignalUpload5 model class file.
 *
 * @package   models
 * @since     1.0
 * @filesource
 */

/**
 * The 5th form in uploading signal, contains electrode information
 * 
 * PatientSignalUpload0 is a Form class. 
 * It is the data structure for keeping form data.
 */
class PatientSignalUpload5 extends CFormModel{

	/**
	 * @var string
	 */
	public $electrodeBrand;
	/**
	 * @var string
	 */
	public $electrodeBatchNumber;
	/**
	 * @var string
	 */
	public $electrodeConductiveGelBrand;
	/**
	 * @var string
	 */
	public $electrodeConductiveGelBatchNumber;
	
	/**
	 * Declares the validation rules.
	 * The rules will be used when requesting validation by call self.validate().
	 * Many class method will call self.validate(), eg: CActiveRecord.save().
	 * @return array validation rules for model attributes.
	 * @see PatientSignal
	 */
	public function rules()
	{
		return array(
			// duplicate the mentioned attributes in PatientSignal
			array('electrodeBrand, electrodeBatchNumber, electrodeConductiveGelBrand,electrodeConductiveGelBatchNumber', 'required','on'=>'next'),
			array('electrodeBrand, electrodeBatchNumber, electrodeConductiveGelBrand,electrodeConductiveGelBatchNumber','length', 'max'=>255),
		);
	}

	/**
	 * Returns the labels for each column variables.
	 * This will be used to render label on page.
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'electrodeBrand' => 'Electrode Brand',
			'electrodeBatchNumber' => 'Electrode Batch Number',
			'electrodeConductiveGelBrand' => 'Conductive Gel Brand',
			'electrodeConductiveGelBatchNumber' => 'Conductive Gel Batch Number',
		);
	}
}